//
//  SEGUhomeMediator+SEGPropertyGrowth.m
//  SEGBasicBussiness
//
//  Created by JokerHe on 2018/3/29.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGUhomeMediator+SEGPropertyGrowth.h"

NSString * const kTargetWashCar = @"WashCar";
NSString * const kActionWashCarViewController = @"initWashCarViewController";
NSString * const kActionWashingCarFinishViewController = @"initWashingCarFinishViewController";

NSString * const kTargetYouZan = @"YouZan";
NSString * const kActionYouZanInitYouZanSDK = @"initYouZanSDK";
NSString * const kActionYouZanInitYouZanViewController = @"initYouZanViewController";

@implementation SEGUhomeMediator (SEGPropertyGrowth)

/**
 * 初始化自助洗车界面
 * @author Joker
 * @param params  参数
 * @return UIViewController
 */
-(UIViewController*)seg_initWashCarViewController:(NSDictionary*)params {
    return [self performTarget:kTargetWashCar action:kActionWashCarViewController params:params shouldCacheTarget:NO];
}

/**
 * 创建二维码扫描界面
 * @author Sam
 */
-(UIViewController *)seg_initSEGQRUhomeViewControllerWithTitle:(NSString*)title responseBlock:(void(^)(NSString* responseString))responseBlock{
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    if (title && [title length] > 0) {
        [params setValue:title forKey:@"scanDesc"];
    }
    if (responseBlock && [title length] > 0) {
        [params setValue:responseBlock forKey:@"responseBlock"];
    }
    return [self performTarget:kTargetWashCar action:@"initSEGQRUhomeViewController" params:params shouldCacheTarget:NO];
}

/**
 * 初始化洗车完成界面
 * @author Joker
 * @param params  参数
 * @return UIViewController
 */
-(UIViewController*)seg_initWashingCarFinishViewController:(NSDictionary*)params {
    return [self performTarget:kTargetWashCar action:kActionWashingCarFinishViewController params:params shouldCacheTarget:NO];
}

@end
